{% load everfilters %}
<!DOCTYPE HTML>
<html lang="en-US">
	<head>
		<meta charset="utf-8">
		<title>{% block title %}{{ site_title }}{% endblock %}</title>
		<link rel="stylesheet" href="{{ site_url }}{{ site_media }}/themes/silently/css/style.css" type="text/css">
	 	<link rel="short icon" href="/favicon.ico">
		<link rel="alternate" type="application/atom+xml" href="{{ site_url }}feeds/atom" />

		<!--[if IE]>
		<script src="{{ site_url }}{{ site_media }}/themes/silently/js/html5.js"></script><![endif]-->
		<!--[if lte IE 7]>
			<link rel="stylesheet" type="text/css" media="all" href="{{ site_url }}{{ site_media }}/themes/silently/css/ie.css"/>
			<script src="{{ site_url }}{{ site_media }}/themes/silently/js/IE8.js" type="text/javascript"></script><![endif]-->
		<!--[if lt IE 7]>
			<link rel="stylesheet" type="text/css" media="all" href="{{ site_url }}{{ site_media }}/themes/silently/css/ie6.css"/><![endif]-->

	</head>
	<body>
		<header id="banner" class="body">
		<h1><a href="{{ site_url }}">{{ site_title }} <strong>{{ tag_line }}</strong></a></h1>
			<nav>
			{% block nav %}
			{% endblock %}
			</nav>
		</header>		
		<section id="content" class="body">
		{% block content %}	
		{% endblock %}
		</section>
		{% block extras %}
			<section id="extras" class="body">
				<div>
					<h2>Recent Posts</h2>
					<ul>
						{% for item in recent_posts %} 
						<li><a href="{{ site_url }}{{ item.date|date:"Y/m/" }}{{ item.id }}/" title="{{ item.title }}">{{ item.title|truncatecn:":20" }}</a></li>
						{% endfor %}
					</ul>
				</div>

				<div>
					<h2>Categories</h2>
					<ul>
						{% for item in tags %}
						<li><a href="{{ site_url }}tag/{{ item.id }}/" title="View all posts filed under {{ item.name }}">{{ item.name }}({{ item.post__count }})</a>
						{% endfor %}
					</ul>
				</div>

				<div>
					<h2>Archives</h2>
					<ul>
						{% for item in archives %}
							<li><a href='{{ site_url }}{{ item.date|date:"Y/m/" }}' title='{{ item.date|date:"M/Y" }}'>{{ item.date|date:"M/Y" }}</a></li>
						{% endfor %}
					</ul>
				</div>
				
				<div>
					<h2>Blogroll</h2>
					<ul>
						{% for item in links %}
						<li><a href="{{ item.url }}" title="{{ item.description }}">{{ item.name }}</a></li>
						{% endfor %}
					</ul>
				</div>
			</section>
		{% endblock %}
		<footer id="footer" class="body">
			<p>
				<span class="left">
					Powered by <a href="http://www.djangoproject.com/" target="_blank">Django</a> | Theme by <a href="http://www.yangxiaoheng.com/">wiboshu</a> | Valid <a href="http://validator.w3.org/check?uri=referer">HTML5</a> and <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3">CSS 3</a>
				</span>
				<span class="right">2009-2010 <a href="http://www.yangxiaoheng.com">yang</a></span>
			</p>
		</footer>
	</body>
</html>
